package com.inforich.app.api.controller.login;

import com.inforich.app.api.dto.LoginDTO;
import com.inforich.app.api.service.IAppLoginService;
import com.inforich.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 登录注册控制器
 * @author: HJM
 * @date: 2022/10/24
 */
@RestController
@RequestMapping("/h5api")
public class AppLoginController {

  @Autowired
  private IAppLoginService appLoginService;

  /**
   * 登录
   */
  @PostMapping("/login")
  public AjaxResult login(@Validated @RequestBody LoginDTO loginDto) {
    return appLoginService.login(loginDto);
  }

}
